package application.controller
{
	import application.ApplicationFacade;
	import application.view.PagingMediator;
	import application.view.PostFormMediator;
	import application.view.TextAreaMediator;
	
	import org.puremvc.interfaces.ICommand;
	import org.puremvc.interfaces.INotification;
	import org.puremvc.patterns.command.SimpleCommand;
	
	public class SetupViewCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification):void
		{
			var main:Main = notification.getBody() as Main;
			
			facade.registerMediator( new PostFormMediator(main.postForm) );
			facade.registerMediator( new PagingMediator(main.paging) );
			facade.registerMediator( new TextAreaMediator(main.textArea) );
			
			sendNotification(ApplicationFacade.VIEW_INIT);
		}
	}
}